# locust777

//
////   0 1 2 3
////   - - - -
////0 |1 2 3 4
////1 |2 3 4 5
////2 |3 4 5 6
////二维数组的创建
//	//int arr1[3][4] = {1,2,3,4,2,3,4,5,3,4,5,6};
//
//#include<stdio.h>
//int main()
//{
//	//int arr1[3][4] = {1,2,3,4,2,3,4,5,3,4,5,6};
//	int arr2[3][4] = {{1,2},{3,4},{5,6}};
//
//	//char arr2[5][10];
//	scanf("%d",arr);
//return 0;
//}
//
//
//
////二维数组的初始化
//int main()
//{
//	int arr[] = {1,2,3,4,5};//5个内存大小
//	int arr[][4] = {{1,2,3,4},{1,2}}//二维数组，行可以不规定，列必须规定
//	int arr1[][4] = {1,2,3,4,2,3,4,5,3,4,5,6};
//
//return 0;
//}




//二维数组的使用,数组输出
#include<stdio.h>
int main()
{
	int arr[3][4] = {1,2,3,4,2,3,4,5,3,4,5,6};
	int i = 0;
	//printf("%d",arr[2][0]);//3
	/*
	for(i = 0;i < 3;i++)
	{
		int j = 0;
	for(j = 0;j < 4;j++)
	{
		printf("%d ",arr[i][j]);//输出数字
	}
	printf("\n");
	}
	*/
	for(i = 0;i < 3;i++)
	{
		int j = 0;
	for(j = 0;j < 4;j++)
	{
		printf("%d ",&arr[i][j]);//输出地址
	}
	printf("\n");
	}
	scanf("%d",i);
return 0;
}


//可以把二维数组理解成：一堆一维数组